<!-- 本文件项目中未使用 -->
<template>
  <div>
      <el-dialog   :modelValue="dialogVisible"  title="文件"  width="40%"
                  :close-on-click-modal="false" :close-on-press-escape="false"
                  :show-close="false" >

          <el-form :model="saveDrwFile"  ref="saveDrwFileRef">
            <el-form-item prop="savedir">
              <el-input v-model="saveDrwFile.savedir" placeholder="保存目录  例如 /dir1 "></el-input>
            </el-form-item>
            <el-form-item prop="filename">
              <el-input v-model="saveDrwFile.filename" placeholder="文件名  例如 file.wdrw"></el-input>
            </el-form-item>
          </el-form>

        <template #footer>
          <el-button @click="handleCancel">取 消</el-button>
          <el-button type="primary" @click="handleOk">确 定</el-button>
        </template>
      </el-dialog>

  </div>
</template>

<script>

import {ElMessage} from "element-plus"
import { mapState } from 'vuex'

export default {
  name: "DlgSelectDrwFile",
  props:{ dialogVisible: Boolean },
  components:{},
  emits:[ "resFileDir" ],

  computed: mapState([
    'componentData',
    'canvasStyleData',
  ]),

  mounted() {

  },

  
  data(){
    return{
      saveDrwFile: {
        savedir: '',
        filename: ''
      },
    }
  },
  watch: {

  },
  methods:{
    //保存文件
    handleOk(  ){
      this.$emit( "resFileDir", 1, this.saveDrwFile )
    },

    handleCancel(  ){
      this.$emit( "resFileDir", 0 )
    }

  },  // end of methods

}

</script>

<style  lang="less" scoped >


</style>